<div class="layui-footer"> 
	<!-- 底部固定区域 --> 
	Copyright © 2005-2016 <a href="w.56z4.com" target="_blank">微粒</a> All Rights Reserved. 
</div>
<!-- 手机站边栏控制按钮 -->
<div class="site-tree-mobile layui-hide"> <i class="layui-icon">&#xe602;</i> </div>
<div class="site-mobile-shade"></div>
<ul class="layui-fixbar">
	<li class="layui-icon layui-fixbar-top" lay-type="top">&#xe619;</li>
</ul>
</div>
<!-- JQ包/ -->
<script src="__PUBLIC__/admin/jQuery/jQuery-2.2.0.min.js"></script>
<!---wangEditor编辑器---->
<script src="__PUBLIC__/admin/wangEditor/wangEditor.min.js"></script>
<!-- Layui/ -->
<script src="__PUBLIC__/admin/layui/layui.js"></script>
<!--[if lt IE 9]>
  <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
  <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script>
//JavaScript代码区域
layui.use(['element', 'layer','form'], function(){
	var $ = layui.$,
	layer = layui.layer,
	element = layui.element;
	$('.cache').click(function(){
		loading = layer.load(2, {
			shade: [0.2,'#000']
		});
		$.getJSON("{:url('cache/clear')}",function(data){
			if(data.code == 200){
				layer.close(loading);
				layer.msg(data.msg, {icon: 1, time: 1000}, function(){
			  		location.reload();
			});
		  	}else{
				layer.close(loading);
				layer.msg(data.msg, {icon: 2, anim: 6, time: 1000});
		  	}
		});
		return false;
	 });
	
	
	
	
	
	
	element.on('nav(demo)', function(elem){
  		//console.log(elem); //得到当前点击的DOM对象
		//layer.msg('切到到了'+ elem.context.innerText);
	});
	
  	//手机左菜单
	var treeMobile = $('.site-tree-mobile'),
	shadeMobile = $('.site-mobile-shade');
	treeMobile.on('click', function() {
		$('body').addClass('site-mobile');
	});
	shadeMobile.on('click', function() {
		$('body').removeClass('site-mobile');
	});
	
	//返回顶部
	$(function(){
		$(window).bind('scroll', {
			fixedOffsetBottom: parseInt($('.layui-fixbar').css('bottom'))
		},
		function(e) {
			var scrollTop = $(window).scrollTop();
			var referFooter =$('.layui-footer');
			scrollTop > 100 ? $('.layui-fixbar-top').show() : $('.layui-fixbar-top').hide();
			if (!/msie 6/i.test(navigator.userAgent)) {
				if ($(window).height() - (referFooter.offset().top - $(window).scrollTop()) > e.data.fixedOffsetBottom) {
					$('.layui-fixbar').css('bottom', $(window).height() - (referFooter.offset().top - $(window).scrollTop()))
				} else {
					$('.layui-fixbar').css('bottom', e.data.fixedOffsetBottom)
				}
			}
		});
		$('.layui-fixbar-top').click(function() {
			$('body,html').stop().animate({
				'scrollTop': 0,
				'duration': 100,
				'easing': 'ease-in'
			})
		});
	});





});
</script>
</body>
</html>